{% extends "base.html" %}
{% load staticfiles %}

{% block title %}合约做市状态{% endblock %}
{% block styles %}
    <style>
        .fixed-table-body {
            height: 70% !important;
        }
    </style>

{% endblock %}

{% block content %}
{#    <section class="content-header">#}
{#        <h1>#}
{#            合约做市状态#}
{#            <small>{{ allHtml.title }}</small>#}
{#        </h1>#}
{#        <ol class="breadcrumb">#}
{#            <li><a href="#"><i class="fa fa-dashboard"></i>Rbac</a></li>#}
{#            <li class="active">合约做市状态</li>#}
{#        </ol>#}
{#    </section>#}

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#fa-icons" data-toggle="tab">做市状态列表</a></li>
                    </ul>

                    <div class="tab-content ">
                        <div class="tab-pane active mailbox-messages" id="fa-icons">
                            <div class=" mailbox-messages">
                                <table class="table table-bordered table-striped table-hover" id="ParaStatusTable">

                                </table>
                            </div>
                        </div>
                        <div class="tab-pane" id="glyphicons">

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>



{% endblock %}

{% block scripts %}

    <script type="text/javascript">

        function InitBootstrapTable(my_url, my_table_id, my_columns, my_filename) {
            $('#' + my_table_id).bootstrapTable('destroy').bootstrapTable({
                url: my_url,
                method: 'get',
                columns: my_columns,
                striped: true,
                cache: false,
                pagination: true,
                sortable: true,
                sortOrder: "asc",
                queryParams: function (pageRequest) {
                    return pageRequest;
                },
                sidePagination: "server",
                pageNumber: 1,
                pageSize: 10,
                pageList: [10, 25, 50, 100],
                {#showColumns: true,#}
                {#showRefresh: true,#}
                minimumCountColumns: 2,
                clickToSelect: true,
                uniqueId: "_id",
                {#showToggle: true,#}
                cardView: false,
                detailView: false,
                //showExport: true,
                {#buttonsAlign: "right",#}
                {#exportDataType: "all",#}
                {#exportTypes: ['excel'],#}
                {#Icons: 'glyphicon-export',#}
                exportOptions: {
                    fileName: my_filename,
                },
            })
        };
        my_columns = [
            {field: "id", title: "ID标识", visible: false},
            {field: "instrumentid", title: "合约代码"},
            {title: "是否正在做市", field: "status"},
            {title: "买单状态", field: "buystatus"},
            {title: "卖单状态", field: "sellstatus"},
            {title: "上次有效时间点", field: "lastrectime"},
            {title: "当天有效做市时间", field: "markettimeday"},
            {title: "当月有效做市时间", field: "markettimemonth"},
            {title: "当日做市交易量", field: "tradevolumeday"},
            {title: "当月做市交易量", field: "tradevolumemonth"},
            {title: "上次更新日期", field: "lastupddate"},
            {title: "分账号代码", field: "accountid"},
            {title: "持仓帐号", field: "combino"}
        ];
        InitBootstrapTable("{% url 'Manager:makemarketpara_status' %}", "ParaStatusTable", my_columns, "mmpara_status");
    </script>




{% endblock %}